package com.connection.second.wallpaper.service.impl;

import java.util.List;

import com.connection.second.wallpaper.domain.entity.PaperAlbum;
import com.connection.second.wallpaper.domain.entity.PaperAlbumWall;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import com.connection.second.wallpaper.mapper.PaperAlbumWallMapper;
import com.connection.second.wallpaper.service.IPaperAlbumWallService;

/**
 * 壁纸专辑关系Service业务层处理
 * 
 * @author FL
 * @date 2024-11-27
 */
@Service
public class PaperAlbumWallServiceImpl implements IPaperAlbumWallService 
{
    @Autowired
    private PaperAlbumWallMapper paperAlbumWallMapper;

    /**
     * 查询壁纸专辑关系
     * 
     * @param id 壁纸专辑关系主键
     * @return 壁纸专辑关系
     */
    @Override
    public PaperAlbumWall selectPaperAlbumWallById(Long id)
    {
        return paperAlbumWallMapper.selectPaperAlbumWallById(id);
    }

    /**
     * 查询壁纸专辑关系列表
     * 
     * @param paperAlbumWall 壁纸专辑关系
     * @return 壁纸专辑关系
     */
    @Override
    @Cacheable(value = "paperAlbumWall", key = "'selectPaperAlbumWallList'+#paperAlbumWall.toString()")
    public List<PaperAlbumWall> selectPaperAlbumWallList(PaperAlbumWall paperAlbumWall)
    {
        return paperAlbumWallMapper.selectPaperAlbumWallList(paperAlbumWall);
    }

    /**
     * 新增壁纸专辑关系
     * 
     * @param paperAlbumWall 壁纸专辑关系
     * @return 结果
     */
    @Override
    public int insertPaperAlbumWall(PaperAlbumWall paperAlbumWall)
    {
        return paperAlbumWallMapper.insertPaperAlbumWall(paperAlbumWall);
    }

    /**
     * 修改壁纸专辑关系
     * 
     * @param paperAlbumWall 壁纸专辑关系
     * @return 结果
     */
    @Override
    public int updatePaperAlbumWall(PaperAlbumWall paperAlbumWall)
    {
        return paperAlbumWallMapper.updatePaperAlbumWall(paperAlbumWall);
    }

    /**
     * 批量删除壁纸专辑关系
     * 
     * @param ids 需要删除的壁纸专辑关系主键
     * @return 结果
     */
    @Override
    public int deletePaperAlbumWallByIds(Long[] ids)
    {
        return paperAlbumWallMapper.deletePaperAlbumWallByIds(ids);
    }

    /**
     * 删除壁纸专辑关系信息
     * 
     * @param id 壁纸专辑关系主键
     * @return 结果
     */
    @Override
    public int deletePaperAlbumWallById(Long id)
    {
        return paperAlbumWallMapper.deletePaperAlbumWallById(id);
    }
}
